{extend name="panel/layout" /}
{block name="main"}
<div id="main-container">
    <div id="breadcrumb">
        <ul class="breadcrumb">
            <li><i class="fa fa-home"></i><a href="/"> 首页</a></li>
            <li><i class="fa fa-desktop"></i><a href="{:url('index')}"> 控制面板</a></li>
            <li class="active">添加/更新QQ</li>
        </ul>
    </div><!-- /breadcrumb-->
    <div class="main-header clearfix">
        <div class="page-title">
            <h3 class="no-margin">添加/更新QQ</h3>
        </div><!-- /page-title -->
    </div>
    <div class="padding-md">
        <div class="row">
            <div class="col-xs-12">
                <div class="panel panel-danger">
                    <div class="panel-body">
                        {:getHtmlCode(config('web_gg_qqadd'))}
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <i class="icon-user"></i>添加/更新QQ
                    </div>
                    <div class="panel-body text-center">
                        <Iframe id="iframepage"
                                src="/qlogin/{if condition='isset($qqInfo)'}?uin={$qqInfo.uin}&pwd={$qqInfo.pwd}{/if}"
                                width="100%" scrolling="no" frameborder="0" name="addFrame"></iframe>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="footJs"}
<script type="text/javascript">
    function reinitIframe() {
        var iframe = document.getElementById("iframepage");
        try {
            iframe.height = iframe.contentWindow.document.documentElement.scrollHeight;
        } catch (ex) {
        }
    }
    window.setInterval("reinitIframe()", 200);
    function showLoad() {
        sweetAlert({
            title: "添加中...",
            text: '请耐心等待，如很长时间都没反应，请刷新网页重新添加！',
            imageUrl: "/assets/load.gif",
            html: true,
            timer: 600000,
            showConfirmButton: false
        });
    }
    function closeLoad() {
        $('.confirm').click();
    }
</script>

{/block}